import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner num = new Scanner(System.in);
        int a = num.nextInt();
        int b = num.nextInt();
        if(a > b){
            System.out.print(a+b+" ");
            System.out.print(a-b+" ");
            System.out.print(a*b+" ");
            System.out.print(a/b+" ");
            System.out.print(a%b);
        }else{
            System.out.print(b+a+" ");
            System.out.print(b-a+" ");
            System.out.print(b*a+" ");
            System.out.print(b/a+" ");
            System.out.print(b%a+" ");
        }
    }
}
